package com.service;

import com.mapper.CoachMapper;
import com.po.Coach;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 阳幸子 on 2018/5/9.
 */
@Service
public class CoachService {
    @Autowired
    CoachMapper coachMapper;
    public int count(){
        return coachMapper.count();
    }
    public List<Coach> selectCoachByPage(int page){
        return coachMapper.selectCoachByPage(page);
    }

    public void addCoach(Coach coach){
        coachMapper.addCoach(coach);
    }

    public Coach selectById(long id){
        return coachMapper.selectById(id);
    }
   public void  updateCoach(Coach coach){
       coachMapper.updateCoach(coach);
    }
    public Coach login(Coach coach){
        return coachMapper.login(coach);
    }
}
